package creational.pattern.builder;

import lombok.Data;

/**
 * @Autor: yuanyongan
 * @Description: 根据建造者模式改造一下，使得代码更简洁
 * @Date 2023/1/9 10:13
 */

@Data
public class ResourcePoolConfig {
    private String name;
    private int maxTotal;
    private int maxIdle;
    private int minIdle;

    public ResourcePoolConfig() {}
    public ResourcePoolConfig setName(String name){
        this.name = name;
        return this;
    }
    public ResourcePoolConfig setMaxTotal(int maxTotal){
        this.maxTotal = maxTotal;
        return this;
    }
    public ResourcePoolConfig setMaxIdle(int maxIdle){
        this.maxIdle = maxIdle;
        return this;
    }
    public ResourcePoolConfig setMinIdle(int minIdle){
        this.minIdle = minIdle;
        return this;
    }
}
